package com.dsx.wechat.button;

/**
 * Created by tianwenqing on 2017/9/6.
 */
public class CreateMenu {

    /**
     * 组装菜单数据
     *
     * @return
     */
    public static Menu getMenu() {
        CommonButton btn11 = new CommonButton();
        btn11.setName("往期");
        btn11.setType("click");
        btn11.setKey("11");

        CommonButton btn12 = new CommonButton();
        btn12.setName("联盟");
        btn12.setType("click");
        btn12.setKey("12");

        CommonButton btn13 = new CommonButton();
        btn13.setName("故事");
        btn13.setType("click");
        btn13.setKey("13");


        CommonButton btn21 = new CommonButton();
        btn21.setName("定制");
        btn21.setType("click");
        btn21.setKey("21");

        CommonButton btn22 = new CommonButton();
        btn22.setName("轰吧");
        btn22.setType("click");
        btn22.setKey("22");

        CommonButton btn23 = new CommonButton();
        btn23.setName("唱吧");
        btn23.setType("click");
        btn23.setKey("23");

        CommonButton btn24 = new CommonButton();
        btn24.setName("酒吧");
        btn24.setType("click");
        btn24.setKey("24");

        CommonButton btn31 = new CommonButton();
        btn31.setName("钱包");
        btn31.setType("click");
        btn31.setKey("31");

        CommonButton btn32 = new CommonButton();
        btn32.setName("会员");
        btn32.setType("click");
        btn32.setKey("32");

        CommonButton btn33 = new CommonButton();
        btn33.setName("注册");
        btn33.setType("click");
        btn33.setKey("33");


        /**
         * 微信：  mainBtn1,mainBtn2,mainBtn3底部的三个一级菜单。
         */

        ComplexButton mainBtn1 = new ComplexButton();
        mainBtn1.setName("遇见");
        //一级下有4个子菜单
        mainBtn1.setSub_button(new CommonButton[] { btn11, btn12, btn13 });


        ComplexButton mainBtn2 = new ComplexButton();
        mainBtn2.setName("悦聚");
        mainBtn2.setSub_button(new CommonButton[] { btn21, btn22, btn23, btn24});


        ComplexButton mainBtn3 = new ComplexButton();
        mainBtn3.setName("快来");
        mainBtn3.setSub_button(new CommonButton[] { btn31, btn32, btn33 });


        /**
         * 封装整个菜单
         */
        Menu menu = new Menu();
        menu.setButton(new Button[] { mainBtn1, mainBtn2, mainBtn3 });

        return menu;
    }
}
